﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Collections;

namespace _1vs100
{
    public class Game
    {
        public Dictionary<int, MobMember> CurrentMob { get; set; }
        //public List<MobMember> currentMob { get; set; }
        public Contestant currentPlayer { get;  set; }
        public Rules currentRules { get; set; }
        public int[] levels { get; set; }
        public int currentLevel { get; set; }
        public int currentPot { get; set; }
        public int mobEliminated { get; set; }
        public Question currentQuestionFile;
        public String currentQuestion { get; set; }
        public String currentAnswer { get; set; }
        public String[] currentChoices { get; set; }
        public Boolean askTheMob { get; set; }
        public Boolean pollTheMob { get; set; }
        public Boolean trustTheMob { get; set; }
        public Boolean timer { get; set; }

        public Game()
        {
            CurrentMob = new Dictionary<int, MobMember>();
            //currentMob = new List<MobMember>();
            currentPlayer = new Contestant();
            currentRules = new Rules();
            levels = new int[10] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000 };
            currentLevel = 1;
            currentPot = 0;
            mobEliminated = 0;
            currentQuestionFile = new Question();
            currentChoices = new string[3];
            askTheMob = true;
            pollTheMob = true;
            trustTheMob = true;
            timer = true;
            fillMobMembers();
        }

        public Game(Contestant c, Rules r)
        {
            CurrentMob = new Dictionary<int, MobMember>();
            //currentMob = new List<MobMember>();
            currentPlayer = c;
            currentRules = r;
            levels = new int[10] { 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000 };
            currentLevel = 1;
            currentPot = 0;
            mobEliminated = 0;
            currentQuestionFile = new Question();
            currentChoices = new string[3];
            askTheMob = true;
            pollTheMob = true;
            trustTheMob = true;
            timer = true;
            fillMobMembers();
        }

        public void fillMobMembers()
        {
            for (int i = 0; i < 100; i++)
            {
                MobMember tempMobMember = new MobMember("mob" + i.ToString());
                CurrentMob.Add(i, tempMobMember);
            }
        }

        /*
        public int mobRemaining()
        {
            int counter = 0;
            for (int i = 0; i < currentMob.Count; i++)
            {
                if (!currentMob.ElementAt(i).Eliminated)
                {
                    counter++;
                }
            }
            return counter;
        }
        */
    }
}
